import Vue from 'vue';
import Router from "vue-router";

Vue.use(Router);

const router = new Router({
    // mode: '',
    routes: [
        {
            path: "/",
            redirect: '/index',
            meta: {
                index: 0
            },
        },
        {
            path: "/index",
            name: 'index',
            component: () => import('@/pages/index.vue'),
            meta: {
                index: 0
            },
        },
        {  
            name: 'guajizhangfen',
            path: "/douyin/guajizhangfen",
            component: () => import('@/pages/douyin/guajizhangfen.vue'),
            meta: {
                index: 1
            },
        },
        {
            path: "/agreement",
            name: 'agreement',
            component: () => import('@/pages/agreement.vue'),
            meta: {
                index: 1
            },
        },
        {
            path: "/settings",
            name: 'settings',
            component: () => import('@/pages/settings.vue'),
            meta: {
                index: 1
            },
        },
        {
            path: "/personal",
            name: 'personal',
            component: () => import('@/pages/personal.vue'),
            meta: {
                index: 0
            },
        }
    ],
    scrollBehavior() {
        return { x: 0, y: 0 };
    },
});
export default router;